package com.qiyu.tech.tcc.starter.service;

import com.qiyu.tech.tcc.starter.dao.UserDao;
import com.qiyu.tech.tcc.starter.model.User;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @author linhao
 * @date created in 4:17 下午 2020/11/4
 */
@Service
public class UserService {

    @Resource
    private UserDao userDao;

    public boolean addCoupon(int userId){
        userDao.addCoupon(userId);
        return true;
    }

    public User queryByUserId(int userId){
        User user = userDao.selectByUserId(userId);
        return user;
    }
}
